package com.lanhai.longheng.beans;

import java.util.ArrayList;
import java.util.List;

import com.lanhai.longheng.utils.Tools;

public class StopAgvBean {

	public StopAgvBean() {
		list=new ArrayList<String>();
	}
	
	private List<String> list;
	
	 
	
	public List<String> getList() {
		return list;
	}

	public void setList(List<String> list) {
		this.list = list;
	}

	public void addAgv(int agvid) {
		String s=agvid+"";
		if(list.contains(s)==false) {
			list.add(s); 
		}
	}
	
	public boolean removeAgv(int agvid) {
		String s=agvid+"";
		if(list.contains(s)) {
			list.remove(s);
			return true;
		}else {
			return false;
		}
	}
	
	public int popAgv() {
		if(list.size()==0) return 0;
		String p=list.get(0);
		list.remove(0);
		
		return Tools.strToInt(p);
	}

}
